
/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

import './bootstrap';
import Vue from 'vue';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import _ from 'lodash';
import ElementUI from 'element-ui';
import makeRouter from './config/router.js';
import RouterList from './router.js';
import axios from './config/axios.js';
import storeFactoy from './store/';
import AppRoot from './page/AppRoot.vue';
import './config/Icon-svg/index';
import './config/iconfont';
import InputBox from './components/InputBox.vue';
import showItem from './components/ShowItem.vue';

window.Vue = Vue;
window._ = _;

Vue.use(VueRouter);
Vue.use(Vuex);
Vue.use(ElementUI);

Vue.component('input-box', InputBox);

Vue.component('show-item', showItem);

const store = storeFactoy(Vuex);
const routerList = RouterList(store);
const router = makeRouter(routerList, store);
window.axios = axios(store, router);
/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

const app = new Vue({
  el: '#app',
  router,
  store,
  ...AppRoot
});
